package com.m3958.firstgwt.server.service;

import java.io.InputStream;
import java.util.Properties;

import com.google.inject.Singleton;

@Singleton
public class PropertyReader {
	
	public Properties getPropertyMap(String fname){
		if(!fname.endsWith("properties")){
			fname = fname + ".properties";
		}
		 Properties prop = new Properties();
	     InputStream in;
	     
	     try {
			in = getClass().getResourceAsStream(fname);
			prop.load(in);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return prop;
	}
}
